onepiecefandomcom_id-20200215-history
Templat:Gallery Potrait/doc
DescriptionEdit This template is used to make portrait galleries. Dependencies This template uses File:NoPicAvailable.png, as well as several subtemplates. SyntaxEdit The template works is to be called as follows: The "portrait code" is peculiar. It consists of three parts, separated by backslashes ("\"). For example, Caesar \ Caesar_Marine_Portrait.png \ Caesar Clown is a portrait code. The first part is the text that is to be showed below the portrait. The second part is the name of the portrait picture (without link brackets or "File:"). It is optional: if it is not present, it is taken to be "XXX Portrait.png", with "XXX" being the text in the third part. Also, there is a special "NOPIC" value: it uses File:NoPicAvailable.png. The third part is the name of the page the portrait and text link to. It is optional: if it is not present, it is taken to be the same as the text (excluding parentheses). Also, there is a special "NOLINK" value, for cases when the portrait should not link to any page. The title and colorscheme are self-explanatory. The template parameter should be given the name of the template page (warning: does not work!); if present, it allows the gallery to feature template links on the left of the title. ExamplesEdit The following code gives the following result: Alvida Pirates Alvida Coby (former) Heppoko Peppoko Poppoko An example with many differents cases, with comments: People Pacifista Caesar Clown Coby (former) Young Teach ??? Marguerite Shanks' Father An example with only one portrait: The Almighty Marguerite Marguerite Advanced UseEdit ColorsEdit It is not always possible to use a colorscheme; to use custom colors, there are parameters textcolor and backcolor. The Almighty Marguerite Marguerite Galleries with SectionsEdit Sometimes, one needs to make sections in a portrait gallery. This can be done by joining several galleries together, thanks to the multi parameter. Use multi=header to start a gallery. Use multi=section to make a section. Use multi=footer to end the gallery. The section parameter is a shortcut: section=XXX is the same as multi=section|title=XXX. Here is an example of gallery with sections: A Gallery with Sections Alvida Pirates Alvida Coby (former) Heppoko Peppoko Poppoko People Pacifista Caesar Clown Coby (former) Young Teach ??? Marguerite Shanks' Father The Almighty Marguerite Marguerite Galleries used as Sections in Other GalleriesEdit Sometimes, galleries are used as sections in bigger galleries (such as in Template:Marine Members Gallery). To allow for a gallery to be included in another, one needs to add the following little code snippet: included= }. It must be added as a parameter. The following example is the code for Template:Macro Pirates Gallery: } |title=Macro Pirates |cs=MacroPiratesColors |Macro |Gyaro |Tansui }} · e · ?Macro Pirates Macro Gyaro Tansui Now we can include this template as a section in another gallery, using parameter included=yes: A Gallery Including Another The Almighty Marguerite Marguerite · e · ?Macro Pirates Macro Gyaro Tansui Alvida Pirates Alvida Coby (former) Heppoko Peppoko Poppoko In order to do the same for galleries that already have several sections, add the snippet in both the header and footer. Here is a simple example: } |multi=header |title=A Gallery with Sections, which Can Be Included Too |cs=FishmenColors }} } |multi=footer }} Putting this in "Template:Foobar Gallery", for example, we can include it in another gallery, exactly as a single-section template, by using . Number of ColumnsEdit The default layout uses 5 columns. It is also possible to use 2, 3, or 4 if needed, thanks to the cols parameter, which must be added to every section. Note that if there are less than 5 portraits in a gallery, leaving the default works anyway. A Gallery using 3 Columns Alvida Pirates Alvida Coby (former) Heppoko Peppoko Poppoko People Pacifista Caesar Clown Coby (former) Young Teach ??? Marguerite Empty CellsEdit Sometimes one needs to center a cell in a section. It can be done using empty cells: A Gallery with Sections The Almighty Marguerite Marguerite Alvida Pirates Alvida Coby (former) Heppoko Peppoko Poppoko Be aware that empty cells only work correctly when the gallery has several rows. LimitationsEdit Each section is limited to 100 portraits. The number of columns is 2, 3, 4, or 5, with 5 the default.